<template>
  <div>
    <h1>购物车</h1>
    <button @click="turn">跳转关于页面下的合作组件</button>
    <hr>
    <foot-com></foot-com>
  </div>
</template>
<script>
import footCom from '../components/Foot'
export default {
  name: "cart",
  components: {
    footCom
  },
  methods: {
    turn () {
      // vue-router 提供的 跳转方法
      // this.$router.push("/about/hezuo")
      // 跳转并params传参
      this.$router.push({ name: "hezuo", params: { price: 1888 } })
      // 跳转并query传参
      // this.$router.push({ name: "hezuo", query: { price: 1999 } })
    }
  },
}
</script>
<style lang="less">
</style>